﻿<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title></title>
    <script src="../../Content/js/angular1.2.13.js"></script>
    
</head>
<body ng-app>
    控制器
    <div ng-controller="MyController">
        <h5>Date:{{clock.now}}</h5>
    </div>
    <script>
        function MyController($scope) {
            $scope.clock = {
                now: new Date()
            };
            var updateClock = function () {
                $scope.clock.now = new Date();
            }
            setInterval(function () {
                $scope.$apply(updateClock);
            }, 1000);
            updateClock();
        };
        
    </script>
    <script src="../../Content/js/angular1.2.29.js"></script>
</body>
</html>
